﻿using CameraWin;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Forms;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace ABELGX
{
    /// <summary>
    /// UserControlVideo.xaml 的交互逻辑
    /// </summary>
    public partial class UserControlVideo : System.Windows.Controls.UserControl
    {
        public PTZType PTZ {  get;private set; }
        CameraPanel cameraPanel = new CameraPanel();
        public ICamera Camera
        {
            get => cameraPanel.Camera;
            set => cameraPanel.SetCamera(value);
        }
        public UserControlVideo()
        {
            InitializeComponent();
            CameraWin.Child = cameraPanel;
            cameraPanel.OnPTZChange += CameraPanel_OnPTZChange;
        }

        private void CameraPanel_OnPTZChange(object sender, EventArgs e)
        {
            PTZ = cameraPanel.PTZ;
        }
    }
}
